import axios from "axios"
import sizesUrls from "../../urls/product/sizes"

export default {
  // 获取所有尺码
  fetchGetSizesByPage (params) {
    return axios.post(sizesUrls.getSizesByPage, params)
  },
  // 添加尺寸
  fetchAddSizes (data) {
    return axios.post(sizesUrls.addSizes, data)
  },
  // 修改尺寸
  fetchEditSizes (data) {
    return axios.post(sizesUrls.editSizes, data)
  },
  // 批量禁用/解禁
  fetchBatchChangeState (data) {
    return axios.post(sizesUrls.batchChangeState, data)
  },
  // 校验尺码是否唯一
  fetchCheckSizes (data) {
    return axios.post(sizesUrls.checkSizes + "?" + data)
  },
  // 获取所有尺码
  fetchGetAllSizes () {
    return axios.post(sizesUrls.getAllSizes)
  }
}
